diff --git a/bb/import.cpp b/bb/import.cpp index b4ae50f7..e4f05ac8 100644 --- a/bb/import.cpp +++ b/bb/import.cpp @@ -87,7 +87,7 @@ std::string bible_import (Webserver_Request& webserver_request) filter_url_file_put_contents (datafile, data); success_message = translate("Import has started."); view.set_variable ("journal", journal_logic_see_journal_for_progress ()); - tasks_logic_queue (task::importbible, { datafile, bible, std::to_string (book), std::to_string (chapter) }); + tasks_logic_queue (task::import_bible, { datafile, bible, std::to_string (book), std::to_string (chapter) }); } else { error_message = translate("Please supply valid Unicode UTF-8 text."); } @@ -106,7 +106,7 @@ std::string bible_import (Webserver_Request& webserver_request) filter_url_file_put_contents (datafile, data); success_message = translate("Import has started."); view.set_variable ("journal", journal_logic_see_journal_for_progress ()); - tasks_logic_queue (task::importbible, { datafile, bible, std::to_string (book), std::to_string (chapter) }); + tasks_logic_queue (task::import_bible, { datafile, bible, std::to_string (book), std::to_string (chapter) }); } else { error_message = translate ("Nothing was uploaded"); } diff --git a/bb/settings.cpp b/bb/settings.cpp index d41830ea..d453b376 100644 --- a/bb/settings.cpp +++ b/bb/settings.cpp @@ -191,7 +191,7 @@ std::string bible_settings (Webserver_Request& webserver_request) const std::string resource = webserver_request.post["add"]; if (!resource.empty ()) { if (write_access) { - tasks_logic_queue (task::importresource, { bible, resource }); + tasks_logic_queue (task::import_resource, { bible, resource }); success_message = translate ("The resource will be imported into the Bible.") + " " + translate ("The journal shows the progress."); } } diff --git a/changes/logic.cpp b/changes/logic.cpp index e1465ec0..4391ab6c 100644 --- a/changes/logic.cpp +++ b/changes/logic.cpp @@ -44,7 +44,7 @@ void changes_logic_start () { - tasks_logic_queue (task::generatechanges); + tasks_logic_queue (task::generate_changes); } diff --git a/changes/manage.cpp b/changes/manage.cpp index 5880affc..a2dc7481 100644 --- a/changes/manage.cpp +++ b/changes/manage.cpp @@ -72,7 +72,7 @@ std::string changes_manage (Webserver_Request& webserver_request) const int jobId = database_jobs.get_new_id (); database_jobs.set_level (jobId, Filter_Roles::manager ()); database_jobs.set_start (jobId, translate ("Clearing change notifications.")); - tasks_logic_queue (task::deletechanges, {std::to_string (jobId), username}); + tasks_logic_queue (task::delete_changes, {std::to_string (jobId), username}); redirect_browser (webserver_request, jobs_index_url () + "?id=" + std::to_string (jobId)); return std::string(); } diff --git a/checks/logic.cpp b/checks/logic.cpp index 5a52c436..d15ef84d 100644 --- a/checks/logic.cpp +++ b/checks/logic.cpp @@ -35,5 +35,5 @@ void checks_logic_start_all () void checks_logic_start (const std::string& bible) { - tasks_logic_queue (task::checkbible, {bible}); + tasks_logic_queue (task::check_bible, {bible}); } diff --git a/collaboration/settings.cpp b/collaboration/settings.cpp index 5cee31c7..f9ebdffb 100644 --- a/collaboration/settings.cpp +++ b/collaboration/settings.cpp @@ -71,7 +71,7 @@ std::string collaboration_settings (Webserver_Request& webserver_request) int jobId = database_jobs.get_new_id (); database_jobs.set_level (jobId, Filter_Roles::admin ()); database_jobs.set_start (jobId, collaboration_link_header ()); - tasks_logic_queue (task::linkgitrepository, {object, std::to_string (jobId), source}); + tasks_logic_queue (task::link_git_repository, {object, std::to_string (jobId), source}); redirect_browser (webserver_request, jobs_index_url () + "?id=" + std::to_string (jobId)); return std::string(); } diff --git a/compare/index.cpp b/compare/index.cpp index fd42031c..6b74e8a2 100644 --- a/compare/index.cpp +++ b/compare/index.cpp @@ -77,7 +77,7 @@ std::string compare_index (Webserver_Request& webserver_request) Database_Jobs database_jobs = Database_Jobs (); const int job_id = database_jobs.get_new_id (); database_jobs.set_level (job_id, Filter_Roles::consultant ()); - tasks_logic_queue (task::compareusfm, {bible, compare, std::to_string (job_id)}); + tasks_logic_queue (task::compare_usfm, {bible, compare, std::to_string (job_id)}); redirect_browser (webserver_request, jobs_index_url () + "?id=" + std::to_string (job_id)); return std::string(); } diff --git a/developer/index.cpp b/developer/index.cpp index 42105788..527a17d8 100644 --- a/developer/index.cpp +++ b/developer/index.cpp @@ -109,7 +109,7 @@ std::string developer_index (Webserver_Request& webserver_request) } if (debug == "receive") { - tasks_logic_queue (task::receiveemail); + tasks_logic_queue (task::receive_email); view.set_variable ("success", "Receiving email and running tasks that send mail"); } @@ -130,7 +130,7 @@ std::string developer_index (Webserver_Request& webserver_request) } if (debug == "maintain") { - tasks_logic_queue (task::maintaindatabase); + tasks_logic_queue (task::maintain_database); view.set_variable ("success", "Starting to maintain the databases"); } diff --git a/email/send.cpp b/email/send.cpp index b9946f34..14696a9e 100644 --- a/email/send.cpp +++ b/email/send.cpp @@ -367,7 +367,7 @@ void email_schedule (std::string to, std::string subject, std::string body, int Database_Mail database_mail (webserver_request); database_mail.send (to, subject, body, time); // Schedule a task to send the scheduled mail right away. - tasks_logic_queue (task::sendemail); + tasks_logic_queue (task::send_email); } diff --git a/export/logic.cpp b/export/logic.cpp index 8efabf6a..06fa67cd 100644 --- a/export/logic.cpp +++ b/export/logic.cpp @@ -31,7 +31,7 @@ // Schedule all Bibles for exports. void export_logic::schedule_all () { - tasks_logic_queue (task::exportall); + tasks_logic_queue (task::export_all); } @@ -42,7 +42,7 @@ void export_logic::schedule_text_and_basic_usfm (const std::string& bible, bool { std::vector books = database::bibles::get_books (bible); for (auto book : books) { - tasks_logic_queue (task::exporttextusfm, {bible, std::to_string (book), filter::strings::convert_to_string (log)}); + tasks_logic_queue (task::export_text_usfm, {bible, std::to_string (book), filter::strings::convert_to_string (log)}); } } @@ -50,7 +50,7 @@ void export_logic::schedule_text_and_basic_usfm (const std::string& bible, bool // Schedule a Bible for export to USFM format. void export_logic::schedule_usfm (const std::string& bible, bool log) { - tasks_logic_queue (task::exportusfm, {bible, filter::strings::convert_to_string (log)}); + tasks_logic_queue (task::export_usfm, {bible, filter::strings::convert_to_string (log)}); } @@ -62,10 +62,10 @@ void export_logic::schedule_open_document (const std::string& bible, bool log) std::vector books = database::bibles::get_books (bible); // Export the books, one OpenDocument file per book. for (auto book : books) { - tasks_logic_queue (task::exportodt, {bible, std::to_string (book), filter::strings::convert_to_string (log)}); + tasks_logic_queue (task::export_odt, {bible, std::to_string (book), filter::strings::convert_to_string (log)}); } // Export the whole Bible to one OpenDocument file. - tasks_logic_queue (task::exportodt, {bible, "0", filter::strings::convert_to_string (log)}); + tasks_logic_queue (task::export_odt, {bible, "0", filter::strings::convert_to_string (log)}); } @@ -73,7 +73,7 @@ void export_logic::schedule_open_document (const std::string& bible, bool log) // $bible: Bible. void export_logic::schedule_info (const std::string& bible, bool log) { - tasks_logic_queue (task::exportinfo, {bible, filter::strings::convert_to_string (log)}); + tasks_logic_queue (task::export_info, {bible, filter::strings::convert_to_string (log)}); } @@ -83,7 +83,7 @@ void export_logic::schedule_html (const std::string& bible, bool log) { std::vector books = database::bibles::get_books (bible); for (auto book : books) { - tasks_logic_queue (task::exporthtml, {bible, std::to_string (book), filter::strings::convert_to_string (log)}); + tasks_logic_queue (task::export_html, {bible, std::to_string (book), filter::strings::convert_to_string (log)}); } } @@ -94,7 +94,7 @@ void export_logic::schedule_web (const std::string& bible, bool log) { std::vector books = database::bibles::get_books (bible); for (auto book : books) { - tasks_logic_queue (task::exportwebmain, {bible, std::to_string (book), filter::strings::convert_to_string (log)}); + tasks_logic_queue (task::export_web_main, {bible, std::to_string (book), filter::strings::convert_to_string (log)}); } } @@ -103,19 +103,19 @@ void export_logic::schedule_web (const std::string& bible, bool log) // $bible: Bible. void export_logic::schedule_web_index (const std::string& bible, bool log) { - tasks_logic_queue (task::exportwebindex, {bible, filter::strings::convert_to_string (log)}); + tasks_logic_queue (task::export_web_index, {bible, filter::strings::convert_to_string (log)}); } void export_logic::schedule_online_bible (const std::string& bible, bool log) { - tasks_logic_queue (task::exportonlinebible, {bible, filter::strings::convert_to_string (log)}); + tasks_logic_queue (task::export_online_bible, {bible, filter::strings::convert_to_string (log)}); } void export_logic::schedule_e_sword (const std::string& bible, bool log) { - tasks_logic_queue (task::exportesword, {bible, filter::strings::convert_to_string (log)}); + tasks_logic_queue (task::export_esword, {bible, filter::strings::convert_to_string (log)}); } diff --git a/images/index.cpp b/images/index.cpp index ddf45ce2..1a1342a9 100644 --- a/images/index.cpp +++ b/images/index.cpp @@ -69,7 +69,7 @@ std::string images_index (Webserver_Request& webserver_request) std::string extension = filter_url_get_extension (file); extension = filter::strings::unicode_string_casefold (extension); if (background_import) { - tasks_logic_queue (task::importbibleimages, { file }); + tasks_logic_queue (task::import_bible_images, { file }); success = translate("The file was uploaded and is being processed."); view.set_variable ("journal", journal_logic_see_journal_for_progress ()); } else { diff --git a/nmt/index.cpp b/nmt/index.cpp index 7a49e9e9..463d7936 100644 --- a/nmt/index.cpp +++ b/nmt/index.cpp @@ -97,7 +97,7 @@ std::string nmt_index (Webserver_Request& webserver_request) if (webserver_request.query.count ("export")) { - tasks_logic_queue (task::export2nmt, {referencebible, translatingbible}); + tasks_logic_queue (task::export_to_nmt, {referencebible, translatingbible}); redirect_browser (webserver_request, journal_index_url ()); return std::string(); } diff --git a/paratext/index.cpp b/paratext/index.cpp index 496a1781..c4e920c7 100644 --- a/paratext/index.cpp +++ b/paratext/index.cpp @@ -156,7 +156,7 @@ std::string paratext_index (Webserver_Request& webserver_request) return page; } else { // Set collaboration up. - tasks_logic_queue (task::setupparatext, { bible, master }); + tasks_logic_queue (task::setup_paratext, { bible, master }); success = translate ("The collaboration will be set up"); if (database::config::general::get_repeat_send_receive () == 0) { database::config::general::set_repeat_send_receive (2); diff --git a/paratext/logic.cpp b/paratext/logic.cpp index 12ed10e0..ec3ab2eb 100644 --- a/paratext/logic.cpp +++ b/paratext/logic.cpp @@ -225,7 +225,7 @@ void Paratext_Logic::copyParatext2Bibledit (std::string bible) // It is easiest to schedule an import task. // The task will take care of everything, including recording what to send to the Cloud. - tasks_logic_queue (task::importbible, { path, bible }); + tasks_logic_queue (task::import_bible, { path, bible }); // Ancestor data needed for future merge. // The Paratext files have cr+lf at the end, and the ancestor data should only have lf at the end of each line. diff --git a/resource/bb2resource.cpp b/resource/bb2resource.cpp index f80e2969..4b204c69 100644 --- a/resource/bb2resource.cpp +++ b/resource/bb2resource.cpp @@ -77,7 +77,7 @@ std::string resource_bible2resource (Webserver_Request& webserver_request) if (webserver_request.query.count ("convert")) { if (access_bible::write (webserver_request, bible)) { - tasks_logic_queue (task::convertbible2resource, {bible}); + tasks_logic_queue (task::convert_bible_to_resource, {bible}); redirect_browser (webserver_request, journal_index_url ()); return std::string(); } else { diff --git a/resource/convert2bible.cpp b/resource/convert2bible.cpp index a8466959..c33d4eb0 100644 --- a/resource/convert2bible.cpp +++ b/resource/convert2bible.cpp @@ -52,7 +52,7 @@ void convert_resource_to_bible (std::string resource) // The Cloud updates the list of available USFM resources for the clients. - tasks_logic_queue (task::listusfmresources); + tasks_logic_queue (task::list_usfm_resources); Database_Logs::log (translate("Conversion completed")); diff --git a/resource/convert2resource.cpp b/resource/convert2resource.cpp index 98865255..2c9ee3e0 100644 --- a/resource/convert2resource.cpp +++ b/resource/convert2resource.cpp @@ -56,7 +56,7 @@ void convert_bible_to_resource (std::string bible) // The Cloud updates the list of available USFM resources for the clients. - tasks_logic_queue (task::listusfmresources); + tasks_logic_queue (task::list_usfm_resources); Database_Logs::log (translate("Completed"), Filter_Roles::manager ()); diff --git a/resource/download.cpp b/resource/download.cpp index dc17dc68..6c082f0f 100644 --- a/resource/download.cpp +++ b/resource/download.cpp @@ -81,7 +81,7 @@ std::string resource_download (Webserver_Request& webserver_request) resources.push_back (name); database::config::general::set_resources_to_cache (resources); } - tasks_logic_queue (task::syncresources); + tasks_logic_queue (task::sync_resources); redirect_browser (webserver_request, journal_index_url ()); return std::string(); } diff --git a/resource/image.cpp b/resource/image.cpp index 3f6e1978..81acbef3 100644 --- a/resource/image.cpp +++ b/resource/image.cpp @@ -83,7 +83,7 @@ std::string resource_image (Webserver_Request& webserver_request) extension = filter::strings::unicode_string_casefold (extension); if (extension == "pdf") background_import = true; if (background_import) { - tasks_logic_queue (task::importimages, { name, file }); + tasks_logic_queue (task::import_images, { name, file }); success = translate("The file was uploaded and is being processed."); view.set_variable ("journal", journal_logic_see_journal_for_progress ()); } else { diff --git a/resource/logic.cpp b/resource/logic.cpp index eea5190b..052cbdce 100644 --- a/resource/logic.cpp +++ b/resource/logic.cpp @@ -904,7 +904,7 @@ void resource_logic_create_cache () resource_logic_create_cache_running = false; // If there's another resource database waiting to be cached, schedule it for caching. - if (!signatures.empty ()) tasks_logic_queue (task::cacheresources); + if (!signatures.empty ()) tasks_logic_queue (task::cache_resources); } diff --git a/resource/manage.cpp b/resource/manage.cpp index e3fe10bc..f745220c 100644 --- a/resource/manage.cpp +++ b/resource/manage.cpp @@ -72,7 +72,7 @@ std::string resource_manage (Webserver_Request& webserver_request) if (access_bible::write (webserver_request, remove)) { database_usfmresources.deleteResource (remove); // The Cloud updates the list of available USFM resources for the clients. - tasks_logic_queue (task::listusfmresources); + tasks_logic_queue (task::list_usfm_resources); } else { view.set_variable ("error", translate("You do not have write access to this resource")); } @@ -91,7 +91,7 @@ std::string resource_manage (Webserver_Request& webserver_request) return page; } if (confirm == "yes") { if (access_bible::write (webserver_request, convert)) { - tasks_logic_queue (task::convertresource2bible, {convert}); + tasks_logic_queue (task::convert_resource_to_bible, {convert}); redirect_browser (webserver_request, journal_index_url ()); return std::string(); } else { diff --git a/resource/organize.cpp b/resource/organize.cpp index ebcb4bf8..ff4f7f40 100644 --- a/resource/organize.cpp +++ b/resource/organize.cpp @@ -242,7 +242,7 @@ std::string resource_organize (Webserver_Request& webserver_request) } } } - tasks_logic_queue (task::syncresources); + tasks_logic_queue (task::sync_resources); view.set_variable ("success", translate ("Will install the resources.") + " " + translate ("The journal displays the progress.")); } diff --git a/resource/print.cpp b/resource/print.cpp index 4e17ae87..c63c7b05 100644 --- a/resource/print.cpp +++ b/resource/print.cpp @@ -78,7 +78,7 @@ std::string resource_print (Webserver_Request& webserver_request) int jobId = database_jobs.get_new_id (); database_jobs.set_level (jobId, Filter_Roles::consultant ()); const std::string& username = webserver_request.session_logic ()->get_username (); - tasks_logic_queue (task::printresources, {std::to_string (jobId), username, bible}); + tasks_logic_queue (task::print_resources, {std::to_string (jobId), username, bible}); redirect_browser (webserver_request, jobs_index_url () + "?id=" + std::to_string (jobId)); return std::string(); } diff --git a/resource/sword.cpp b/resource/sword.cpp index f1bfddc1..cf0a21fa 100644 --- a/resource/sword.cpp +++ b/resource/sword.cpp @@ -49,13 +49,13 @@ bool resource_sword_acl (Webserver_Request& webserver_request) std::string resource_sword (Webserver_Request& webserver_request) { if (webserver_request.query.count ("refresh")) { - tasks_logic_queue (task::refreshswordmodules); + tasks_logic_queue (task::refresh_sword_modules); redirect_browser (webserver_request, journal_index_url ()); } if (webserver_request.query.count ("update")) { - tasks_logic_queue (task::updateswordmodules, {}); + tasks_logic_queue (task::update_sword_modules, {}); redirect_browser (webserver_request, journal_index_url ()); } diff --git a/rss/logic.cpp b/rss/logic.cpp index 9f0a79d7..6ef51adf 100644 --- a/rss/logic.cpp +++ b/rss/logic.cpp @@ -92,7 +92,7 @@ void rss_logic_schedule_update (std::string user, std::string bible, int book, i parameters.push_back (std::to_string (chapter)); parameters.push_back (oldusfm); parameters.push_back (newusfm); - tasks_logic_queue (task::rssfeedupdatechapter, parameters); + tasks_logic_queue (task::rss_feed_update_chapter, parameters); } diff --git a/sendreceive/files.cpp b/sendreceive/files.cpp index fdd8b238..2cbdee27 100644 --- a/sendreceive/files.cpp +++ b/sendreceive/files.cpp @@ -84,7 +84,7 @@ void sendreceive_files () if (sendreceive_logic_prioritized_task_is_active ()) { sendreceive_files_done (); std::this_thread::sleep_for (std::chrono::seconds (5)); - tasks_logic_queue (task::syncfiles); + tasks_logic_queue (task::sync_files); return; } diff --git a/sendreceive/logic.cpp b/sendreceive/logic.cpp index aa588c2a..16e89102 100644 --- a/sendreceive/logic.cpp +++ b/sendreceive/logic.cpp @@ -32,7 +32,7 @@ void sendreceive_queue_bible (std::string bible) { - tasks_logic_queue (task::sendreceivebibles, {bible}); + tasks_logic_queue (task::send_receive_bibles, {bible}); } @@ -84,35 +84,35 @@ void sendreceive_queue_sync (int minute, int second) // Only queue a sync task if it is not running at the moment. if (sync_bibles) { - if (tasks_logic_queued (task::syncbibles)) { + if (tasks_logic_queued (task::sync_bibles)) { Database_Logs::log ("About to start synchronizing Bibles"); } else { - tasks_logic_queue (task::syncbibles); + tasks_logic_queue (task::sync_bibles); } } if (sync_rest) { - if (tasks_logic_queued (task::syncnotes)) { + if (tasks_logic_queued (task::sync_notes)) { Database_Logs::log ("About to start synchronizing Notes"); } else { - tasks_logic_queue (task::syncnotes); + tasks_logic_queue (task::sync_notes); } - if (tasks_logic_queued (task::syncsettings)) { + if (tasks_logic_queued (task::sync_settings)) { Database_Logs::log ("About to start synchronizing Settings"); } else { - tasks_logic_queue (task::syncsettings); + tasks_logic_queue (task::sync_settings); } - if (tasks_logic_queued (task::syncchanges)) { + if (tasks_logic_queued (task::sync_changes)) { Database_Logs::log ("About to start synchronizing Changes"); } else { - tasks_logic_queue (task::syncchanges); + tasks_logic_queue (task::sync_changes); } - if (tasks_logic_queued (task::syncfiles)) { + if (tasks_logic_queued (task::sync_files)) { Database_Logs::log ("About to start synchronizing Files"); } else { - tasks_logic_queue (task::syncfiles); + tasks_logic_queue (task::sync_files); } // Sync resources always, because it checks on its own whether to do something. - tasks_logic_queue (task::syncresources); + tasks_logic_queue (task::sync_resources); } if (sync_bibles || sync_rest) { @@ -127,11 +127,11 @@ void sendreceive_queue_sync (int minute, int second) // Returns the result as a boolean. bool sendreceive_sync_queued () { - if (tasks_logic_queued (task::syncnotes)) return true; - if (tasks_logic_queued (task::syncbibles)) return true; - if (tasks_logic_queued (task::syncsettings)) return true; - if (tasks_logic_queued (task::syncchanges)) return true; - if (tasks_logic_queued (task::syncfiles)) return true; + if (tasks_logic_queued (task::sync_notes)) return true; + if (tasks_logic_queued (task::sync_bibles)) return true; + if (tasks_logic_queued (task::sync_settings)) return true; + if (tasks_logic_queued (task::sync_changes)) return true; + if (tasks_logic_queued (task::sync_files)) return true; return false; } @@ -143,7 +143,7 @@ void sendreceive_queue_paratext (tasks::enums::paratext_sync method) if (sendreceive_paratext_queued ()) { Database_Logs::log ("About to start synchronizing with Paratext"); } else { - tasks_logic_queue (task::syncparatext, { std::to_string(static_cast(method)) }); + tasks_logic_queue (task::sync_paratext, { std::to_string(static_cast(method)) }); } #endif (void) method; @@ -154,7 +154,7 @@ void sendreceive_queue_paratext (tasks::enums::paratext_sync method) // Returns the result as a boolean. bool sendreceive_paratext_queued () { - if (tasks_logic_queued (task::syncparatext)) return true; + if (tasks_logic_queued (task::sync_paratext)) return true; return false; } diff --git a/sendreceive/resources.cpp b/sendreceive/resources.cpp index 05492c38..0147053e 100644 --- a/sendreceive/resources.cpp +++ b/sendreceive/resources.cpp @@ -88,7 +88,7 @@ void sendreceive_resources () if (sendreceive_logic_prioritized_task_is_active ()) { sendreceive_resources_done (); std::this_thread::sleep_for (std::chrono::seconds (5)); - tasks_logic_queue (task::syncresources); + tasks_logic_queue (task::sync_resources); return; } @@ -222,7 +222,7 @@ void sendreceive_resources () sendreceive_resources_interrupt = false; // If there's another resource waiting to be cached, schedule it for caching. - if (!resources.empty ()) tasks_logic_queue (task::syncresources); + if (!resources.empty ()) tasks_logic_queue (task::sync_resources); } diff --git a/setup/logic.cpp b/setup/logic.cpp index 40af4363..7e3d00fa 100644 --- a/setup/logic.cpp +++ b/setup/logic.cpp @@ -85,8 +85,8 @@ void setup_conditionally (const char * package) #ifndef HAVE_CLIENT // Cloud updates the available SWORD modules and web resources. - tasks_logic_queue (task::refreshswordmodules); - tasks_logic_queue (task::refreshwebresources); + tasks_logic_queue (task::refresh_sword_modules); + tasks_logic_queue (task::refresh_web_resources); #endif // Update installed version. @@ -121,11 +121,11 @@ void setup_conditionally (const char * package) // the app may shut down before the tasks have been completed. // Next time the app starts, the tasks will be restarted here, and they will run if a flag was set for them. // Once the tasks are really complete, they will clear the flag. - tasks_logic_queue (task::reindexbibles); - tasks_logic_queue (task::reindexnotes); + tasks_logic_queue (task::reindex_bibles); + tasks_logic_queue (task::reindex_notes); #ifdef HAVE_CLIENT // Same for the resource downloader, for the client. - tasks_logic_queue (task::syncresources); + tasks_logic_queue (task::sync_resources); #endif } @@ -260,7 +260,7 @@ void setup_initialize_data () // To make installation fast, the creation of the sample Bible is now done in the background. const std::vector bibles = database::bibles::get_bibles (); if (bibles.empty ()) { - tasks_logic_queue (task::createsamplebible); + tasks_logic_queue (task::create_sample_bible); } // Schedule reindexing Bible search data. diff --git a/styles/sheets.cpp b/styles/sheets.cpp index 21777108..6d3fdb72 100644 --- a/styles/sheets.cpp +++ b/styles/sheets.cpp @@ -32,7 +32,7 @@ // The advantage of this is that the user interface will be more responsive. void styles_sheets_create_all () { - tasks_logic_queue (task::createcss); + tasks_logic_queue (task::create_css); } diff --git a/sword/logic.cpp b/sword/logic.cpp index c01057fe..6f3033c7 100644 --- a/sword/logic.cpp +++ b/sword/logic.cpp @@ -265,10 +265,10 @@ void sword_logic_install_module_schedule (const std::string& source, const std:: if (module.empty ()) return; // Check whether the module installation has been scheduled already. - if (tasks_logic_queued (task::installswordmodule, {source, module})) return; + if (tasks_logic_queued (task::install_sword_module, {source, module})) return; // Schedule it. - tasks_logic_queue (task::installswordmodule, {source, module}); + tasks_logic_queue (task::install_sword_module, {source, module}); } diff --git a/sync/resources.cpp b/sync/resources.cpp index c4bdcf85..90ced0d4 100644 --- a/sync/resources.cpp +++ b/sync/resources.cpp @@ -89,8 +89,8 @@ std::string sync_resources (Webserver_Request& webserver_request) signatures.push_back (signature); database::config::general::set_resources_to_cache (signatures); } - if (!tasks_logic_queued (task::cacheresources)) { - tasks_logic_queue (task::cacheresources); + if (!tasks_logic_queued (task::cache_resources)) { + tasks_logic_queue (task::cache_resources); } return "0"; } diff --git a/system/index.cpp b/system/index.cpp index 1967d16c..8ec9f651 100644 --- a/system/index.cpp +++ b/system/index.cpp @@ -170,9 +170,9 @@ std::string system_index (Webserver_Request& webserver_request) const int jobId = database_jobs.get_new_id (); database_jobs.set_level (jobId, Filter_Roles::member ()); std::string task {}; - if (producebibles) task = task::producebiblestransferfile; - if (producenotes) task = task::producenotestransferfile; - if (produceresources) task = task::produceresourcestransferfile; + if (producebibles) task = task::produce_bibles_transferfile; + if (producenotes) task = task::produce_notes_transferfile; + if (produceresources) task = task::produce_resources_transferfile; tasks_logic_queue (task, { std::to_string(jobId) }); redirect_browser (webserver_request, jobs_index_url () + "?id=" + std::to_string(jobId)); return std::string(); @@ -190,7 +190,7 @@ std::string system_index (Webserver_Request& webserver_request) filter_url_file_put_contents (datafile, data); success = translate("Import has started."); view.set_variable ("journal", journal_logic_see_journal_for_progress ()); - tasks_logic_queue (task::importbiblestransferfile, { datafile }); + tasks_logic_queue (task::import_bibles_transferfile, { datafile }); } else { error = translate ("Nothing was imported"); } @@ -214,7 +214,7 @@ std::string system_index (Webserver_Request& webserver_request) filter_url_file_put_contents (datafile, data); success = translate("Import has started."); view.set_variable ("journal", journal_logic_see_journal_for_progress ()); - tasks_logic_queue (task::importnotestransferfile, { datafile }); + tasks_logic_queue (task::import_notes_transferfile, { datafile }); } else { error = translate ("Nothing was imported"); } @@ -238,7 +238,7 @@ std::string system_index (Webserver_Request& webserver_request) filter_url_file_put_contents (datafile, data); success = translate("Import has started."); view.set_variable ("journal", journal_logic_see_journal_for_progress ()); - tasks_logic_queue (task::importresourcestransferfile, { datafile }); + tasks_logic_queue (task::import_resources_transferfile, { datafile }); } else { error = translate ("Nothing was imported"); } @@ -255,7 +255,7 @@ std::string system_index (Webserver_Request& webserver_request) // Force re-index Bibles. if (webserver_request.query ["reindex"] == "bibles") { database::config::general::set_index_bibles (true); - tasks_logic_queue (task::reindexbibles, {"1"}); + tasks_logic_queue (task::reindex_bibles, {"1"}); redirect_browser (webserver_request, journal_index_url ()); return std::string(); } @@ -264,7 +264,7 @@ std::string system_index (Webserver_Request& webserver_request) // Re-index consultation notes. if (webserver_request.query ["reindex"] == "notes") { database::config::general::setIndexNotes (true); - tasks_logic_queue (task::reindexnotes); + tasks_logic_queue (task::reindex_notes); redirect_browser (webserver_request, journal_index_url ()); return std::string(); } @@ -314,7 +314,7 @@ std::string system_index (Webserver_Request& webserver_request) // Handle the command to clear the web and resources caches. if (webserver_request.query.count ("clearcache")) { - tasks_logic_queue (task::clearcaches); + tasks_logic_queue (task::clear_caches); redirect_browser (webserver_request, journal_index_url ()); return std::string(); } diff --git a/system/logic.cpp b/system/logic.cpp index 06f34b67..2fd4f696 100644 --- a/system/logic.cpp +++ b/system/logic.cpp @@ -178,7 +178,7 @@ void system_logic_import_bibles_file (std::string tarball) // Since new Bibles may have been imported, index them all. database::config::general::set_index_bibles (true); - tasks_logic_queue (task::reindexbibles, {"1"}); + tasks_logic_queue (task::reindex_bibles, {"1"}); // Ready, hallelujah! Database_Logs::log ("Importing Bibles ready"); @@ -269,7 +269,7 @@ void system_logic_import_notes_file (std::string tarball) // Since notes may have been imported or updated, index them all. database::config::general::setIndexNotes (true); - tasks_logic_queue (task::reindexnotes); + tasks_logic_queue (task::reindex_notes); // Ready, hallelujah! Database_Logs::log ("Importing Consultation Notes ready"); diff --git a/tasks/logic.h b/tasks/logic.h index f9e9791c..3f7d5ba6 100644 --- a/tasks/logic.h +++ b/tasks/logic.h @@ -23,68 +23,68 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. namespace task { -constexpr const auto rotatejournal {"rotatejournal"}; -constexpr const auto receiveemail {"receiveemail"}; -constexpr const auto sendemail {"sendemail"}; -constexpr const auto reindexbibles {"reindexbibles"}; -constexpr const auto reindexnotes {"reindexnotes"}; -constexpr const auto createcss {"createcss"}; -constexpr const auto importbible {"importusfm"}; -constexpr const auto importresource {"importresource"}; -constexpr const auto compareusfm {"compareusfm"}; -constexpr const auto maintaindatabase {"maintaindatabase"}; -constexpr const auto cleantmpfiles {"cleantmpfiles"}; -constexpr const auto linkgitrepository {"linkgitrepository"}; -constexpr const auto sendreceivebibles {"sendreceivebibles"}; -constexpr const auto syncbibles {"syncbibles"}; -constexpr const auto syncnotes {"syncnotes"}; -constexpr const auto syncsettings {"syncsettings"}; -constexpr const auto syncchanges {"syncchanges"}; -constexpr const auto syncfiles {"syncfiles"}; -constexpr const auto syncresources {"syncresources"}; -constexpr const auto cleandemo {"cleandemo"}; -constexpr const auto convertbible2resource {"convertbible2resource"}; -constexpr const auto convertresource2bible {"convertresource2bible"}; -constexpr const auto printresources {"printresources"}; -constexpr const auto notesstatistics {"notesstatistics"}; -constexpr const auto generatechanges {"generatechanges"}; -constexpr const auto sprintburndown {"sprintburndown"}; -constexpr const auto checkbible {"checkbible"}; -constexpr const auto exportall {"exportall"}; -constexpr const auto exporttextusfm {"exporttextusfm"}; -constexpr const auto exportusfm {"exportusfm"}; -constexpr const auto exportodt {"exportodt"}; -constexpr const auto exportinfo {"exportinfo"}; -constexpr const auto exporthtml {"exporthtml"}; -constexpr const auto exportwebmain {"exportwebmain"}; -constexpr const auto exportwebindex {"exportwebindex"}; -constexpr const auto exportonlinebible {"exportonlinebible"}; -constexpr const auto exportesword {"exportesword"}; +constexpr const auto rotate_journal {"rotatejournal"}; +constexpr const auto receive_email {"receiveemail"}; +constexpr const auto send_email {"sendemail"}; +constexpr const auto reindex_bibles {"reindexbibles"}; +constexpr const auto reindex_notes {"reindexnotes"}; +constexpr const auto create_css {"createcss"}; +constexpr const auto import_bible {"importusfm"}; +constexpr const auto import_resource {"importresource"}; +constexpr const auto compare_usfm {"compareusfm"}; +constexpr const auto maintain_database {"maintaindatabase"}; +constexpr const auto clean_tmp_files {"cleantmpfiles"}; +constexpr const auto link_git_repository {"linkgitrepository"}; +constexpr const auto send_receive_bibles {"sendreceivebibles"}; +constexpr const auto sync_bibles {"syncbibles"}; +constexpr const auto sync_notes {"syncnotes"}; +constexpr const auto sync_settings {"syncsettings"}; +constexpr const auto sync_changes {"syncchanges"}; +constexpr const auto sync_files {"syncfiles"}; +constexpr const auto sync_resources {"syncresources"}; +constexpr const auto clean_demo {"cleandemo"}; +constexpr const auto convert_bible_to_resource {"convertbible2resource"}; +constexpr const auto convert_resource_to_bible {"convertresource2bible"}; +constexpr const auto print_resources {"printresources"}; +constexpr const auto notes_statistics {"notesstatistics"}; +constexpr const auto generate_changes {"generatechanges"}; +constexpr const auto sprint_burndown {"sprintburndown"}; +constexpr const auto check_bible {"checkbible"}; +constexpr const auto export_all {"exportall"}; +constexpr const auto export_text_usfm {"exporttextusfm"}; +constexpr const auto export_usfm {"exportusfm"}; +constexpr const auto export_odt {"exportodt"}; +constexpr const auto export_info {"exportinfo"}; +constexpr const auto export_html {"exporthtml"}; +constexpr const auto export_web_main {"exportwebmain"}; +constexpr const auto export_web_index {"exportwebindex"}; +constexpr const auto export_online_bible {"exportonlinebible"}; +constexpr const auto export_esword {"exportesword"}; constexpr const auto hyphenate {"hyphenate"}; -constexpr const auto setupparatext {"setupparatext"}; -constexpr const auto syncparatext {"syncparatext"}; -constexpr const auto importimages {"importimages"}; -constexpr const auto refreshswordmodules {"refreshswordmodules"}; -constexpr const auto installswordmodule {"installswordmodule"}; -constexpr const auto updateswordmodules {"updateallswordmodules"}; -constexpr const auto listusfmresources {"listusfmresources"}; -constexpr const auto createsamplebible {"createsamplebible"}; -constexpr const auto cacheresources {"cacheresources"}; -constexpr const auto refreshwebresources {"refreshwebresources"}; -constexpr const auto rssfeedupdatechapter {"rssfeedupdatechapter"}; -constexpr const auto producebiblestransferfile {"producebiblestransferfile"}; -constexpr const auto importbiblestransferfile {"importbiblestransferfile"}; -constexpr const auto producenotestransferfile {"producenotestransferfile"}; -constexpr const auto importnotestransferfile {"importnotestransferfile"}; -constexpr const auto produceresourcestransferfile {"produceresourcestransferfile"}; -constexpr const auto importresourcestransferfile {"importresourcestransferfile"}; -constexpr const auto deletechanges {"deletechanges"}; -constexpr const auto clearcaches {"clearcaches"}; -constexpr const auto trimcaches {"trimcaches"}; -constexpr const auto export2nmt {"export2nmt"}; -constexpr const auto createemptybible {"createemptybible"}; -constexpr const auto importbibleimages {"importbibleimages"}; -constexpr const auto getgoogleaccesstoken {"getgoogleaccesstoken"}; +constexpr const auto setup_paratext {"setupparatext"}; +constexpr const auto sync_paratext {"syncparatext"}; +constexpr const auto import_images {"importimages"}; +constexpr const auto refresh_sword_modules {"refreshswordmodules"}; +constexpr const auto install_sword_module {"installswordmodule"}; +constexpr const auto update_sword_modules {"updateallswordmodules"}; +constexpr const auto list_usfm_resources {"listusfmresources"}; +constexpr const auto create_sample_bible {"createsamplebible"}; +constexpr const auto cache_resources {"cacheresources"}; +constexpr const auto refresh_web_resources {"refreshwebresources"}; +constexpr const auto rss_feed_update_chapter {"rssfeedupdatechapter"}; +constexpr const auto produce_bibles_transferfile {"producebiblestransferfile"}; +constexpr const auto import_bibles_transferfile {"importbiblestransferfile"}; +constexpr const auto produce_notes_transferfile {"producenotestransferfile"}; +constexpr const auto import_notes_transferfile {"importnotestransferfile"}; +constexpr const auto produce_resources_transferfile {"produceresourcestransferfile"}; +constexpr const auto import_resources_transferfile {"importresourcestransferfile"}; +constexpr const auto delete_changes {"deletechanges"}; +constexpr const auto clear_caches {"clearcaches"}; +constexpr const auto trim_caches {"trimcaches"}; +constexpr const auto export_to_nmt {"export2nmt"}; +constexpr const auto create_empty_bible {"createemptybible"}; +constexpr const auto import_bible_images {"importbibleimages"}; +constexpr const auto get_google_access_token {"getgoogleaccesstoken"}; } diff --git a/tasks/run.cpp b/tasks/run.cpp index 879cd4f5..e7eef3bb 100644 --- a/tasks/run.cpp +++ b/tasks/run.cpp @@ -126,197 +126,197 @@ void tasks_run_one (const std::string& filename) lines.erase (lines.begin ()); } - if (command == task::rotatejournal) { + if (command == task::rotate_journal) { Database_Logs::rotate (); } - else if (command == task::receiveemail) { + else if (command == task::receive_email) { email_receive (); } - else if (command == task::sendemail) { + else if (command == task::send_email) { email_send (); } - else if (command == task::reindexbibles) { + else if (command == task::reindex_bibles) { search_reindex_bibles (filter::strings::convert_to_bool (parameter1)); } - else if (command == task::reindexnotes) { + else if (command == task::reindex_notes) { search_reindex_notes (); } - else if (command == task::createcss) { + else if (command == task::create_css) { styles_sheets_create_all_run (); } - else if (command == task::importbible) { + else if (command == task::import_bible) { bible_import_run (parameter1, parameter2, filter::strings::convert_to_int (parameter3), filter::strings::convert_to_int (parameter4)); } - else if (command == task::importresource) { + else if (command == task::import_resource) { bible_logic::import_resource (parameter1, parameter2); } - else if (command == task::compareusfm) { + else if (command == task::compare_usfm) { compare_compare (parameter1, parameter2, filter::strings::convert_to_int (parameter3)); } - else if (command == task::maintaindatabase) { + else if (command == task::maintain_database) { database_maintenance (); } - else if (command == task::cleantmpfiles) { + else if (command == task::clean_tmp_files) { tmp_tmp (); } - else if (command == task::linkgitrepository) { + else if (command == task::link_git_repository) { collaboration_link (parameter1, filter::strings::convert_to_int (parameter2), parameter3); } - else if (command == task::sendreceivebibles) { + else if (command == task::send_receive_bibles) { sendreceive_sendreceive (parameter1); } - else if (command == task::syncnotes) { + else if (command == task::sync_notes) { sendreceive_notes (); } - else if (command == task::syncbibles) { + else if (command == task::sync_bibles) { sendreceive_bibles (); } - else if (command == task::syncsettings) { + else if (command == task::sync_settings) { sendreceive_settings (); } - else if (command == task::syncchanges) { + else if (command == task::sync_changes) { sendreceive_changes (); } - else if (command == task::syncfiles) { + else if (command == task::sync_files) { sendreceive_files (); } - else if (command == task::syncresources) { + else if (command == task::sync_resources) { sendreceive_resources (); } - else if (command == task::cleandemo) { + else if (command == task::clean_demo) { demo_clean_data (); } - else if (command == task::convertbible2resource) { + else if (command == task::convert_bible_to_resource) { convert_bible_to_resource (parameter1); } - else if (command == task::convertresource2bible) { + else if (command == task::convert_resource_to_bible) { convert_resource_to_bible (parameter1); } - else if (command == task::printresources) { + else if (command == task::print_resources) { resource_print_job (parameter1, parameter2, parameter3); } - else if (command == task::notesstatistics) { + else if (command == task::notes_statistics) { statistics_statistics (); } - else if (command == task::generatechanges) { + else if (command == task::generate_changes) { changes_modifications (); } - else if (command == task::sprintburndown) { + else if (command == task::sprint_burndown) { sprint_burndown ("", 0, 0); } - else if (command == task::checkbible) { + else if (command == task::check_bible) { checks_run (parameter1); } - else if (command == task::exportall) { + else if (command == task::export_all) { export_index (); } - else if (command == task::exportwebmain) { + else if (command == task::export_web_main) { export_web_book (parameter1, filter::strings::convert_to_int (parameter2), filter::strings::convert_to_bool (parameter3)); } - else if (command == task::exportwebindex) { + else if (command == task::export_web_index) { export_web_index (parameter1, filter::strings::convert_to_bool (parameter2)); } - else if (command == task::exporthtml) { + else if (command == task::export_html) { export_html_book (parameter1, filter::strings::convert_to_int (parameter2), filter::strings::convert_to_bool (parameter3)); } - else if (command == task::exportusfm) { + else if (command == task::export_usfm) { export_usfm (parameter1, filter::strings::convert_to_bool (parameter2)); } - else if (command == task::exporttextusfm) { + else if (command == task::export_text_usfm) { export_text_usfm_book (parameter1, filter::strings::convert_to_int (parameter2), filter::strings::convert_to_bool (parameter3)); } - else if (command == task::exportodt) { + else if (command == task::export_odt) { export_odt_book (parameter1, filter::strings::convert_to_int (parameter2), filter::strings::convert_to_bool (parameter3)); } - else if (command == task::exportinfo) { + else if (command == task::export_info) { export_info (parameter1, filter::strings::convert_to_bool (parameter2)); } - else if (command == task::exportesword) { + else if (command == task::export_esword) { export_esword (parameter1, filter::strings::convert_to_bool (parameter2)); } - else if (command == task::exportonlinebible) { + else if (command == task::export_online_bible) { export_onlinebible (parameter1, filter::strings::convert_to_bool (parameter2)); } else if (command == task::hyphenate) { manage_hyphenate (parameter1, parameter2); } - else if (command == task::setupparatext) { + else if (command == task::setup_paratext) { Paratext_Logic::setup (parameter1, parameter2); } - else if (command == task::syncparatext) { + else if (command == task::sync_paratext) { int imethod = filter::strings::convert_to_int(parameter1); auto method = static_cast(imethod); Paratext_Logic::synchronize (method); } - else if (command == task::importimages) { + else if (command == task::import_images) { resource_logic_import_images (parameter1, parameter2); } - else if (command == task::refreshswordmodules) { + else if (command == task::refresh_sword_modules) { sword_logic_refresh_module_list (); } - else if (command == task::installswordmodule) { + else if (command == task::install_sword_module) { sword_logic_run_scheduled_module_install (parameter1, parameter2); } - else if (command == task::updateswordmodules) { + else if (command == task::update_sword_modules) { sword_logic_update_installed_modules (); } - else if (command == task::listusfmresources) { + else if (command == task::list_usfm_resources) { client_logic_usfm_resources_update (); } - else if (command == task::createsamplebible) { + else if (command == task::create_sample_bible) { demo_create_sample_bible (); } - else if (command == task::cacheresources) { + else if (command == task::cache_resources) { resource_logic_create_cache (); } - else if (command == task::refreshwebresources) { + else if (command == task::refresh_web_resources) { resource_logic_bible_gateway_module_list_refresh (); resource_logic_study_light_module_list_refresh (); } #ifdef HAVE_CLOUD - else if (command == task::rssfeedupdatechapter) { + else if (command == task::rss_feed_update_chapter) { rss_logic_execute_update (parameter1, parameter2, filter::strings::convert_to_int (parameter3), filter::strings::convert_to_int (parameter4), parameter5, parameter6); } #endif #ifdef HAVE_CLIENT - else if (command == task::producebiblestransferfile) { + else if (command == task::produce_bibles_transferfile) { system_logic_produce_bibles_file (filter::strings::convert_to_int (parameter1)); } - else if (command == task::importbiblestransferfile) { + else if (command == task::import_bibles_transferfile) { system_logic_import_bibles_file (parameter1); } - else if (command == task::producenotestransferfile) { + else if (command == task::produce_notes_transferfile) { system_logic_produce_notes_file (filter::strings::convert_to_int (parameter1)); } - else if (command == task::importnotestransferfile) { + else if (command == task::import_notes_transferfile) { system_logic_import_notes_file (parameter1); } - else if (command == task::produceresourcestransferfile) { + else if (command == task::produce_resources_transferfile) { system_logic_produce_resources_file (filter::strings::convert_to_int (parameter1)); } - else if (command == task::importresourcestransferfile) { + else if (command == task::import_resources_transferfile) { system_logic_import_resources_file (parameter1); } #endif - else if (command == task::deletechanges) { + else if (command == task::delete_changes) { changes_clear_notifications_user (parameter1, parameter2); } - else if (command == task::clearcaches) { + else if (command == task::clear_caches) { database::cache::file::trim (true); } - else if (command == task::trimcaches) { + else if (command == task::trim_caches) { database::cache::file::trim (false); } - else if (command == task::export2nmt) { + else if (command == task::export_to_nmt) { nmt_logic_export (parameter1, parameter2); } - else if (command == task::createemptybible) { + else if (command == task::create_empty_bible) { bible_logic::create_empty_bible (parameter1); } - else if (command == task::importbibleimages) { + else if (command == task::import_bible_images) { images_logic_import_images (parameter1); } - else if (command == task::getgoogleaccesstoken) { + else if (command == task::get_google_access_token) { filter::google::refresh_access_token (); } else { diff --git a/timer/index.cpp b/timer/index.cpp index 3bf95217..51f7f5c0 100644 --- a/timer/index.cpp +++ b/timer/index.cpp @@ -56,7 +56,7 @@ void timer_index () #ifdef HAVE_CLOUD // Right after startup, update the Google Translate access token. - tasks_logic_queue(task::getgoogleaccesstoken); + tasks_logic_queue(task::get_google_access_token); #endif while (config_globals_webserver_running) { @@ -101,13 +101,13 @@ void timer_index () previous_minute = minute; // Every minute send out queued email. - tasks_logic_queue (task::sendemail); + tasks_logic_queue (task::send_email); #ifdef HAVE_CLOUD // Check for new mail every five minutes. // Do not check more often with gmail else the account may be shut down. if ((minute % 5) == 0) { - tasks_logic_queue (task::receiveemail); + tasks_logic_queue (task::receive_email); } #endif @@ -115,7 +115,7 @@ void timer_index () // The nine is chosen, because the journal rotation will summarize the send/receive messages. // In case send/receive happens every five minutes, it is expected that under normal circumstances // the whole process of sending/receivning will be over, so summarization can then be done. - if (minute == 9) tasks_logic_queue (task::rotatejournal); + if (minute == 9) tasks_logic_queue (task::rotate_journal); // Sending and receiving Bibles to and from the git repository. // On a production website running on an inexpensive virtual private server, @@ -148,7 +148,7 @@ void timer_index () // Database maintenance and trimming. // It takes a few minutes on a production machine. if ((hour == 0) && (minute == 50)) { - tasks_logic_queue (task::maintaindatabase); + tasks_logic_queue (task::maintain_database); } #ifdef HAVE_CLOUD @@ -159,7 +159,7 @@ void timer_index () // The new way of trimming on the Cloud is to do the trimming every hour. // And to leave files in the files cache for only a couple of hours. if (minute == 10) { - tasks_logic_queue (task::trimcaches); + tasks_logic_queue (task::trim_caches); } #endif @@ -175,7 +175,7 @@ void timer_index () // Delete expired temporal files. if ((hour == 2) && (minute == 0)) { - tasks_logic_queue (task::cleantmpfiles); + tasks_logic_queue (task::clean_tmp_files); } // Re-index Bibles and notes. @@ -183,15 +183,15 @@ void timer_index () if ((hour == 2) && (minute == 0)) { Database_State::create (); database::config::general::set_index_bibles (true); - tasks_logic_queue (task::reindexbibles); + tasks_logic_queue (task::reindex_bibles); database::config::general::setIndexNotes (true); - tasks_logic_queue (task::reindexnotes); + tasks_logic_queue (task::reindex_notes); } // Actions for a demo installation. if (minute == 10) { if (config::logic::demo_enabled ()) { - tasks_logic_queue (task::cleandemo); + tasks_logic_queue (task::clean_demo); } } @@ -200,7 +200,7 @@ void timer_index () // It runs every hour in the Cloud. // The script itself determines what to do at which hour of the day or day of the week or day of the month. if (minute == 5) { - tasks_logic_queue (task::sprintburndown); + tasks_logic_queue (task::sprint_burndown); } #endif @@ -232,7 +232,7 @@ void timer_index () #ifdef HAVE_CLOUD // Email notes statistics to the users. if ((hour == 3) && (minute == 0)) { - tasks_logic_queue (task::notesstatistics); + tasks_logic_queue (task::notes_statistics); } #endif @@ -242,12 +242,12 @@ void timer_index () if (weekday == 1) { // Refresh. if ((hour == 3) && (minute == 5)) { - tasks_logic_queue (task::refreshswordmodules); - tasks_logic_queue (task::refreshwebresources); + tasks_logic_queue (task::refresh_sword_modules); + tasks_logic_queue (task::refresh_web_resources); } // Update installed SWORD modules, shortly after the module list has been refreshed. if ((hour == 3) && (minute == 15)) { - tasks_logic_queue (task::updateswordmodules); + tasks_logic_queue (task::update_sword_modules); } } #endif @@ -256,7 +256,7 @@ void timer_index () // The Cloud updates the list of USFM resources once a week. if (weekday == 1) { if ((hour == 3) && (minute == 10)) { - tasks_logic_queue (task::listusfmresources); + tasks_logic_queue (task::list_usfm_resources); } } #endif @@ -267,7 +267,7 @@ void timer_index () // So before the hour has expired, renew the token again. google_translate_authentication_token_age_minute++; if (google_translate_authentication_token_age_minute > 50) { - tasks_logic_queue(task::getgoogleaccesstoken); + tasks_logic_queue(task::get_google_access_token); google_translate_authentication_token_age_minute = 0; } #endif