Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions .github/workflows/erlang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,27 @@ on:
workflow_dispatch: {}

jobs:

build:

runs-on: ubuntu-24.04

name: OTP:${{matrix.otp}}
strategy:
matrix:
otp: ['28', '27']
rebar3: ['3.26']
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: erlef/setup-beam@v1
id: setup-beam
with:
version-type: strict
version-file: .tool-versions
otp-version: ${{matrix.otp}}
rebar3-version: ${{matrix.rebar3}}
- name: Restore _build
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: _build
key: _build-cache-for-os-${{runner.os}}-otp-${{steps.setup-beam.outputs.otp-version}}-rebar3-${{steps.setup-beam.outputs.rebar3-version}}-hash-${{hashFiles('rebar.lock')}}
- name: Restore rebar3's cache
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/.cache/rebar3
key: rebar3-cache-for-os-${{runner.os}}-otp-${{steps.setup-beam.outputs.otp-version}}-rebar3-${{steps.setup-beam.outputs.rebar3-version}}-hash-${{hashFiles('rebar.lock')}}
Expand All @@ -39,9 +41,9 @@ jobs:
- name: Run tests and verifications
run: rebar3 test
- name: Upload code coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
file: "_build/test/covertool/worker_pool.covertool.xml"
files: ./_build/test/covertool/worker_pool.covertool.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
2 changes: 0 additions & 2 deletions .tool-versions

This file was deleted.

4 changes: 1 addition & 3 deletions src/wpool_pool.erl
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,7 @@ function_location(Function, Location) ->
task(undefined) ->
[];
task({_TaskId, Started, Task}) ->
Time =
calendar:datetime_to_gregorian_seconds(
calendar:universal_time()),
Time = erlang:system_time(second),
[{task, Task}, {runtime, Time - Started}].

%% @doc Set next within the worker pool record. Useful when using
Expand Down
2 changes: 1 addition & 1 deletion src/wpool_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ task_init(Task,
task_end(undefined) ->
erlang:erase(wpool_task);
task_end(TimerRef) ->
_ = erlang:cancel_timer(TimerRef),
_ = erlang:cancel_timer(TimerRef, [{async, true}, {info, false}]),
erlang:erase(wpool_task).

%% @doc Adds default parameters to a pool configuration
Expand Down