Skip to content

Instantly share code, notes, and snippets.

View aonamrata's full-sized avatar
🌟
what a wonderful world

Namrata Patel aonamrata

🌟
what a wonderful world
View GitHub Profile
@aonamrata
aonamrata / caching.spec.js
Created March 17, 2021 16:07
caching.spec.js
/* eslint-disable max-classes-per-file */
import { ContextFactory } from 'lib/test-helpers/factories';
import { InMemoryLRUCache } from 'apollo-server-caching';
import OwsDataSource from '../ows-data-source';
let counter = 0;
const mockGet = jest.fn().mockImplementation(() => {
counter += 1;
return { get: `call ${counter} result` };
});
@aonamrata
aonamrata / after.log
Created May 9, 2019 11:13
scoped_session to ows-assets localhost:4001/asset/product/2615181
200 OK Time:15136 ms
2019-05-09 16:34:05,461 INFO sqlalchemy.engine.base.Engine BEGIN (implicit)
2019-05-09 16:34:05,462 INFO sqlalchemy.engine.base.Engine SELECT asset_type.asset_type_id AS asset_type_asset_type_id, asset_type
.asset AS asset_type_asset, asset_type.file_type AS asset_type_file_type, asset_type.extension AS asset_type_extension, asset_type
.initial_folder AS asset_type_initial_folder, asset_type.folder_structure AS asset_type_folder_structure, asset_type.parent_asset_
type_id AS asset_type_parent_asset_type_id
FROM asset_type
WHERE asset_type.asset = %(asset_1)s
2019-05-09 16:34:05,463 INFO sqlalchemy.engine.base.Engine {'asset_1': 'WAV_correction'}
2019-05-09 16:34:05,825 INFO sqlalchemy.engine.base.Engine ROLLBACK
@aonamrata
aonamrata / td-agent.conf
Last active March 16, 2018 10:54
Fluentd ES plugin
<source>
@type udp
tag direct_app # required
format json # /^(?<field1>\{.+\})$/ # required
port 20001 # optional. 5160 by default
</source>
<match direct_app>
@type copy