Merge branch 'master' of bitbucket.org:bluetradesys/spark
This commit is contained in:
commit
d86b73bdf2
3 files changed
+32
-82
No files matched your search
Vendored
+19
-78
@@ -12,53 +12,6 @@
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": true
|
||||
},
|
||||
{
|
||||
"name": "Python",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"stopOnEntry": false,
|
||||
"pythonPath": "${config:python.pythonPath}",
|
||||
"program": "${file}",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"env": {},
|
||||
"envFile": "${workspaceRoot}/.env",
|
||||
"args": [ "DEBUG" ],
|
||||
"debugOptions": [
|
||||
"WaitOnAbnormalExit",
|
||||
"WaitOnNormalExit",
|
||||
"RedirectOutput"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "WSL Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/mnt/d/blue/spark/build/gcc_debug/src/server/sparkd/sparkd",
|
||||
"miDebuggerServerAddress": "localhost:8002",
|
||||
"args": ["md", "dump", "abc"],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/mnt/d/blue/spark/build/gcc_debug/src/server/sparkd/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "enable pretty-printer",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\windows\\sysnative\\bash.exe",
|
||||
"pipeArgs": ["-c"],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/mnt/d/blue/spark/": "d:\\blue\\spark"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Docker Launch",
|
||||
"type": "cppdbg",
|
||||
@@ -103,37 +56,25 @@
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/bts/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "eh-3 launch",
|
||||
"type": "cppdbg",
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Python",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"program": "/home/eharding/spark/sparkd",
|
||||
"args": ["run"],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/eharding/spark/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "enable pretty-printer",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": ["eharding@eh-3"],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/bts/": "d:\\blue\\spark"
|
||||
}
|
||||
},
|
||||
"stopOnEntry": false,
|
||||
"pythonPath": "${config:python.pythonPath}",
|
||||
"program": "${file}",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"env": {},
|
||||
"envFile": "${workspaceRoot}/.env",
|
||||
"args": [ "DEBUG" ],
|
||||
"debugOptions": [
|
||||
"WaitOnAbnormalExit",
|
||||
"WaitOnNormalExit",
|
||||
"RedirectOutput"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "edge-asp051",
|
||||
"type": "cppdbg",
|
||||
@@ -160,7 +101,7 @@
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/bts/": "d:\\blue\\spark"
|
||||
"/bts/": "${workspaceRoot}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -25,12 +25,14 @@ struct SpreaderOrderMan::PImpl {
|
||||
sec_db(db),
|
||||
native_order_factory(factory),
|
||||
spreader_orders(),
|
||||
md_subscribers(),
|
||||
gateway_ready(false)
|
||||
{}
|
||||
|
||||
securities::SecurityDB &sec_db;
|
||||
NativeOrderFactory &native_order_factory;
|
||||
SpreaderOrderMap spreader_orders;
|
||||
std::vector<SpreaderOrder*> md_subscribers;
|
||||
bool gateway_ready;
|
||||
};
|
||||
|
||||
@@ -77,7 +79,14 @@ void SpreaderOrderMan::on(event::CreateSpreaderOrder const&cso)
|
||||
create_native_order_signal,
|
||||
update_native_order_signal,
|
||||
cancel_native_order_signal,
|
||||
md_subscription_signal);
|
||||
[this,order_ptr = order.get()] (const event::MDSubscription &sub) {
|
||||
auto it = std::find(me->md_subscribers.begin(),
|
||||
me->md_subscribers.end(),
|
||||
order_ptr);
|
||||
if (it == me->md_subscribers.end())
|
||||
me->md_subscribers.push_back(order_ptr);
|
||||
md_subscription_signal(sub);
|
||||
});
|
||||
order->init();
|
||||
if (me->gateway_ready)
|
||||
order->on_connect();
|
||||
@@ -117,8 +126,8 @@ void SpreaderOrderMan::on(event::CancelSpreaderOrder const&cancel)
|
||||
|
||||
void SpreaderOrderMan::on(event::BookUpdate const&book_update)
|
||||
{
|
||||
for (auto const &kvp : me->spreader_orders)
|
||||
kvp.second->on_book(book_update.correlation_id, book_update.book);
|
||||
for (auto const &so : me->md_subscribers)
|
||||
so->on_book(book_update.correlation_id, book_update.book);
|
||||
}
|
||||
|
||||
void SpreaderOrderMan::on(event::GatewayStatusChange const&c)
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace orderman {
|
||||
class Book;
|
||||
class NativeOrderFactory;
|
||||
using namespace bts::spreader;
|
||||
//class SpreaderOrderUpdateMessage;
|
||||
|
||||
class SpreaderOrder : public SpreaderOrderBase, public ISpreaderManager
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in new issue
Block a user