• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

blockexchange / blockexchange / 13331571900

14 Feb 2025 02:48PM UTC coverage: 52.251% (+0.4%) from 51.84%
13331571900

push

github

BuckarooBanzay
deduplicate schemapart code

12 of 13 new or added lines in 5 files covered. (92.31%)

48 existing lines in 8 files now uncovered.

975 of 1866 relevant lines covered (52.25%)

1898.59 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

81.82
/jobcontext.lua
1
---------
2
-- job context utilities
3

4
local job_context_map = {}
1✔
5

6
--- sets the current job context for the player
7
-- @param playername the name of the player
8
-- @param ctx the job context for the worker
9
-- @param promise the job's promise, for cleanup/removal of the job-data
10
-- @return the payload in json format
11
function blockexchange.set_job_context(playername, ctx, promise)
2✔
12
    -- force-enable the hud for the player
13
    blockexchange.set_player_hud(playername, true)
5✔
14

15
    job_context_map[playername] = ctx
5✔
16
    if promise then
5✔
17
        promise:finally(function()
10✔
18
            job_context_map[playername] = nil
5✔
19
        end)
20
    end
21
end
22

23
--- returns the current job context for the player, nil if no job active
24
-- @param playername the name of the player
25
-- @return the current job contect
26
function blockexchange.get_job_context(playername)
2✔
UNCOV
27
    return job_context_map[playername]
×
28
end
29

30
--- returns all job contexts
31
-- @return the job context map with playername as key
32
function blockexchange.get_job_contexts()
2✔
UNCOV
33
    return job_context_map
×
34
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc