[{"data":1,"prerenderedAt":478},["ShallowReactive",2],{"content-query-hfk5Q1uebv":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":7,"icon":9,"body":10,"_type":472,"_id":473,"_source":474,"_file":475,"_stem":476,"_extension":477},"/dragonfly/main/addtask","main",false,"","ArmaDragonflyClient - Add Task","mdi:file-text-outline",{"type":11,"children":12,"toc":457},"root",[13,22,29,35,41,54,60,308,314,319,325,332,341,347,356,362,371,377,407,413],{"type":14,"tag":15,"props":16,"children":18},"element","h1",{"id":17},"add-task",[19],{"type":20,"value":21},"text","Add Task",{"type":14,"tag":23,"props":24,"children":26},"h2",{"id":25},"description",[27],{"type":20,"value":28},"Description",{"type":14,"tag":30,"props":31,"children":32},"p",{},[33],{"type":20,"value":34},"Adds a task to the database operation queue. This function is used to schedule database operations that can be processed sequentially, providing a way to manage multiple database requests in an organized manner.",{"type":14,"tag":23,"props":36,"children":38},{"id":37},"syntax",[39],{"type":20,"value":40},"Syntax",{"type":14,"tag":42,"props":43,"children":48},"pre",{"className":44,"code":46,"language":47,"meta":7},[45],"language-sqf","[_taskType, _key, _keyField, _index, _value, _function, _call, _netId] call dragonfly_db_fnc_addTask\n","sqf",[49],{"type":14,"tag":50,"props":51,"children":52},"code",{"__ignoreMap":7},[53],{"type":20,"value":46},{"type":14,"tag":23,"props":55,"children":57},{"id":56},"parameters",[58],{"type":20,"value":59},"Parameters",{"type":14,"tag":61,"props":62,"children":63},"table",{},[64,92],{"type":14,"tag":65,"props":66,"children":67},"thead",{},[68],{"type":14,"tag":69,"props":70,"children":71},"tr",{},[72,78,83,87],{"type":14,"tag":73,"props":74,"children":75},"th",{},[76],{"type":20,"value":77},"Parameter",{"type":14,"tag":73,"props":79,"children":80},{},[81],{"type":20,"value":82},"Type",{"type":14,"tag":73,"props":84,"children":85},{},[86],{"type":20,"value":28},{"type":14,"tag":73,"props":88,"children":89},{},[90],{"type":20,"value":91},"Default",{"type":14,"tag":93,"props":94,"children":95},"tbody",{},[96,124,149,174,201,230,255,282],{"type":14,"tag":69,"props":97,"children":98},{},[99,109,114,119],{"type":14,"tag":100,"props":101,"children":102},"td",{},[103],{"type":14,"tag":50,"props":104,"children":106},{"className":105},[],[107],{"type":20,"value":108},"_taskType",{"type":14,"tag":100,"props":110,"children":111},{},[112],{"type":20,"value":113},"String",{"type":14,"tag":100,"props":115,"children":116},{},[117],{"type":20,"value":118},"Type of operation to perform (e.g., \"hgetall\")",{"type":14,"tag":100,"props":120,"children":121},{},[122],{"type":20,"value":123},"\"\"",{"type":14,"tag":69,"props":125,"children":126},{},[127,136,140,145],{"type":14,"tag":100,"props":128,"children":129},{},[130],{"type":14,"tag":50,"props":131,"children":133},{"className":132},[],[134],{"type":20,"value":135},"_key",{"type":14,"tag":100,"props":137,"children":138},{},[139],{"type":20,"value":113},{"type":14,"tag":100,"props":141,"children":142},{},[143],{"type":20,"value":144},"Name of the stored key",{"type":14,"tag":100,"props":146,"children":147},{},[148],{"type":20,"value":123},{"type":14,"tag":69,"props":150,"children":151},{},[152,161,165,170],{"type":14,"tag":100,"props":153,"children":154},{},[155],{"type":14,"tag":50,"props":156,"children":158},{"className":157},[],[159],{"type":20,"value":160},"_keyField",{"type":14,"tag":100,"props":162,"children":163},{},[164],{"type":20,"value":113},{"type":14,"tag":100,"props":166,"children":167},{},[168],{"type":20,"value":169},"Field name for hash operations",{"type":14,"tag":100,"props":171,"children":172},{},[173],{"type":20,"value":123},{"type":14,"tag":69,"props":175,"children":176},{},[177,186,191,196],{"type":14,"tag":100,"props":178,"children":179},{},[180],{"type":14,"tag":50,"props":181,"children":183},{"className":182},[],[184],{"type":20,"value":185},"_index",{"type":14,"tag":100,"props":187,"children":188},{},[189],{"type":20,"value":190},"Number",{"type":14,"tag":100,"props":192,"children":193},{},[194],{"type":20,"value":195},"Index for list operations",{"type":14,"tag":100,"props":197,"children":198},{},[199],{"type":20,"value":200},"-1",{"type":14,"tag":69,"props":202,"children":203},{},[204,213,218,223],{"type":14,"tag":100,"props":205,"children":206},{},[207],{"type":14,"tag":50,"props":208,"children":210},{"className":209},[],[211],{"type":20,"value":212},"_value",{"type":14,"tag":100,"props":214,"children":215},{},[216],{"type":20,"value":217},"Array, String, Number, or Boolean",{"type":14,"tag":100,"props":219,"children":220},{},[221],{"type":20,"value":222},"Value to store (for set operations)",{"type":14,"tag":100,"props":224,"children":225},{},[226],{"type":14,"tag":227,"props":228,"children":229},"span",{},[],{"type":14,"tag":69,"props":231,"children":232},{},[233,242,246,251],{"type":14,"tag":100,"props":234,"children":235},{},[236],{"type":14,"tag":50,"props":237,"children":239},{"className":238},[],[240],{"type":20,"value":241},"_function",{"type":14,"tag":100,"props":243,"children":244},{},[245],{"type":20,"value":113},{"type":14,"tag":100,"props":247,"children":248},{},[249],{"type":20,"value":250},"Name of function to call with the result",{"type":14,"tag":100,"props":252,"children":253},{},[254],{"type":20,"value":123},{"type":14,"tag":69,"props":256,"children":257},{},[258,267,272,277],{"type":14,"tag":100,"props":259,"children":260},{},[261],{"type":14,"tag":50,"props":262,"children":264},{"className":263},[],[265],{"type":20,"value":266},"_call",{"type":14,"tag":100,"props":268,"children":269},{},[270],{"type":20,"value":271},"Boolean",{"type":14,"tag":100,"props":273,"children":274},{},[275],{"type":20,"value":276},"Whether to call the function directly (true) or spawn (false)",{"type":14,"tag":100,"props":278,"children":279},{},[280],{"type":20,"value":281},"false",{"type":14,"tag":69,"props":283,"children":284},{},[285,294,298,303],{"type":14,"tag":100,"props":286,"children":287},{},[288],{"type":14,"tag":50,"props":289,"children":291},{"className":290},[],[292],{"type":20,"value":293},"_netId",{"type":14,"tag":100,"props":295,"children":296},{},[297],{"type":20,"value":113},{"type":14,"tag":100,"props":299,"children":300},{},[301],{"type":20,"value":302},"NetID of the target to receive the result",{"type":14,"tag":100,"props":304,"children":305},{},[306],{"type":20,"value":307},"nil",{"type":14,"tag":23,"props":309,"children":311},{"id":310},"return-value",[312],{"type":20,"value":313},"Return Value",{"type":14,"tag":30,"props":315,"children":316},{},[317],{"type":20,"value":318},"None. The task is added to the queue and processed asynchronously.",{"type":14,"tag":23,"props":320,"children":322},{"id":321},"examples",[323],{"type":20,"value":324},"Examples",{"type":14,"tag":326,"props":327,"children":329},"h3",{"id":328},"add-a-hash-table-retrieval-task",[330],{"type":20,"value":331},"Add a hash table retrieval task:",{"type":14,"tag":42,"props":333,"children":336},{"className":334,"code":335,"language":47,"meta":7},[45],"[\"hgetall\", \"\", \"\", -1, [], \"dragonfly_db_fnc_test\"] call dragonfly_db_fnc_addTask;\n",[337],{"type":14,"tag":50,"props":338,"children":339},{"__ignoreMap":7},[340],{"type":20,"value":335},{"type":14,"tag":326,"props":342,"children":344},{"id":343},"add-a-player-specific-task-that-returns-data-to-a-specific-client",[345],{"type":20,"value":346},"Add a player-specific task that returns data to a specific client:",{"type":14,"tag":42,"props":348,"children":351},{"className":349,"code":350,"language":47,"meta":7},[45],"[\"hgetallid\", getPlayerUID player, \"\", -1, [], \"dragonfly_db_fnc_test\", false, netId player] remoteExecCall [\"dragonfly_db_fnc_addTask\", 2, false];\n",[352],{"type":14,"tag":50,"props":353,"children":354},{"__ignoreMap":7},[355],{"type":20,"value":350},{"type":14,"tag":326,"props":357,"children":359},{"id":358},"add-a-list-operation-task",[360],{"type":20,"value":361},"Add a list operation task:",{"type":14,"tag":42,"props":363,"children":366},{"className":364,"code":365,"language":47,"meta":7},[45],"[\"listadd\", \"playerMessages\", \"\", -1, [\"New message content\"], \"\"] call dragonfly_db_fnc_addTask;\n",[367],{"type":14,"tag":50,"props":368,"children":369},{"__ignoreMap":7},[370],{"type":20,"value":365},{"type":14,"tag":23,"props":372,"children":374},{"id":373},"notes",[375],{"type":20,"value":376},"Notes",{"type":14,"tag":378,"props":379,"children":380},"ul",{},[381,387,392,397,402],{"type":14,"tag":382,"props":383,"children":384},"li",{},[385],{"type":20,"value":386},"Tasks are processed in the order they are added to the queue",{"type":14,"tag":382,"props":388,"children":389},{},[390],{"type":20,"value":391},"If the queue is not currently being processed, this function will start the processing",{"type":14,"tag":382,"props":393,"children":394},{},[395],{"type":20,"value":396},"The task type determines which database operation will be performed",{"type":14,"tag":382,"props":398,"children":399},{},[400],{"type":20,"value":401},"This function is particularly useful for scheduling multiple related operations",{"type":14,"tag":382,"props":403,"children":404},{},[405],{"type":20,"value":406},"All operations performed through the task queue are logged for debugging",{"type":14,"tag":23,"props":408,"children":410},{"id":409},"links",[411],{"type":20,"value":412},"Links",{"type":14,"tag":30,"props":414,"children":415},{},[416,421,423,429,430,436,437,443,444,450,451],{"type":14,"tag":417,"props":418,"children":419},"a",{"href":4},[420],{"type":20,"value":21},{"type":20,"value":422}," |\n",{"type":14,"tag":417,"props":424,"children":426},{"href":425},"/dragonfly/main/handler",[427],{"type":20,"value":428},"Handler",{"type":20,"value":422},{"type":14,"tag":417,"props":431,"children":433},{"href":432},"/dragonfly/main/init",[434],{"type":20,"value":435},"Init",{"type":20,"value":422},{"type":14,"tag":417,"props":438,"children":440},{"href":439},"/dragonfly/main/processqueue",[441],{"type":20,"value":442},"Process Queue",{"type":20,"value":422},{"type":14,"tag":417,"props":445,"children":447},{"href":446},"/dragonfly/main/scheduler",[448],{"type":20,"value":449},"Scheduler",{"type":20,"value":422},{"type":14,"tag":417,"props":452,"children":454},{"href":453},"/dragonfly/main/setup",[455],{"type":20,"value":456},"Setup",{"title":7,"searchDepth":458,"depth":458,"links":459},2,[460,461,462,463,464,470,471],{"id":25,"depth":458,"text":28},{"id":37,"depth":458,"text":40},{"id":56,"depth":458,"text":59},{"id":310,"depth":458,"text":313},{"id":321,"depth":458,"text":324,"children":465},[466,468,469],{"id":328,"depth":467,"text":331},3,{"id":343,"depth":467,"text":346},{"id":358,"depth":467,"text":361},{"id":373,"depth":458,"text":376},{"id":409,"depth":458,"text":412},"markdown","content:dragonfly:main:addTask.md","content","dragonfly/main/addTask.md","dragonfly/main/addTask","md",1742777962682]