Store items and icons into the db
This commit is contained in:
parent
f2b8abf82b
commit
6b9502ea3e
12 changed files with 219 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
|||
#include "evloop.hpp"
|
||||
#include "timer_items.hpp"
|
||||
#include "timer_icons.hpp"
|
||||
#include "eventia/eventia.hpp"
|
||||
#include "eventia/timer.hpp"
|
||||
#include "roar11/ThreadPool.hpp"
|
||||
#include "oro/api.hpp"
|
||||
#include <iostream>
|
||||
|
@ -27,14 +27,15 @@ void join(roar11::ThreadPool& pool) {
|
|||
|
||||
} //unnamed namespace
|
||||
|
||||
void test(oro::Api* api) {
|
||||
void test(oro::Api* api, oro::OriginsDB* db) {
|
||||
const std::size_t thread_count = 2U; //std::min(std::max(3U, std::thread::hardware_concurrency()) - 1, 4U);
|
||||
std::cout << "Running with " << thread_count << " worker threads\n";
|
||||
roar11::ThreadPool pool(thread_count);
|
||||
eve::Eventia worker;
|
||||
pool.submit(worker.event_functor());
|
||||
|
||||
auto fetcher = worker.make_timer<TimerItems>(3.0, &pool, api);
|
||||
auto timer_items = worker.make_timer<TimerItems>(3.0, &pool, api, db);
|
||||
auto timer_icons = worker.make_timer<TimerIcons>(20.0, &pool, api, db);
|
||||
|
||||
join(pool);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue