Skip to content

Listing of job info does not show temporal information when using PostgreSQLManager #2328

@francescoingv

Description

@francescoingv

Description
When using PostgreSQLManager the temporal information do not appear in job listing.

Steps to Reproduce
When using the process manager PostgreSQLManager,
at http://localhost:5000/jobs

I find no information about fields Start and Duration
The source lines of the job list table I get look like the following:

<tr>
                <td class="small"><a href="[http://localhost:5000/jobs/19b6a18a-4233-11f1-afd9-398ecf7e3873](view-source:http://localhost:5000/jobs/19b6a18a-4233-11f1-afd9-398ecf7e3873)">19b6a18a-4233-11f1-afd9-398ecf7e3873</a></td>
                <td class="small"><a href="[http://localhost:5000/processes/hello-world](view-source:http://localhost:5000/processes/hello-world)">hello-world</a></td>
                <td><abbr title=""></abbr></td>
                <td>
                  
                    
                  
                </td>
                <td>
                  <progress class="inline" value="1000" max="1000"></progress>
                </td>
                <td>
                  <mark class="successful">successful</mark>
                </td>
                <td>
                  Job complete
                </td>
              </tr>

However requesting the JOSN format:
http://localhost:5000/jobs?f=json

I get the expected data on dates, from which the API should derive Start and Duration:

    "jobs":[
        {
            "type":"process",
            "processID":"hello-world",
            "jobID":"19b6a18a-4233-11f1-afd9-398ecf7e3873",
            "status":"successful",
            "message":"Job complete",
            "progress":100,
            "parameters":null,
            "created":"2026-04-27T12:17:46.736341+02:00",
            "started":"2026-04-27T12:17:46.736359+02:00",
            "finished":"2026-04-27T12:17:52.372388+02:00",
            "updated":"2026-04-27T12:17:52.372399+02:00",
            "links":[
                {
                    "href":"http://localhost:5000/jobs/19b6a18a-4233-11f1-afd9-398ecf7e3873/results",
                    "rel":"http://www.opengis.net/def/rel/ogc/1.0/results",
                    "type":"teststring",
                    "title":"Results of job None as teststring"
                }
            ]
        },

I tried changing the process manager to TinyDBManager and the problem did not happen:
at http://localhost:5000/jobs I get:

<tr>
                <td class="small"><a href="[http://localhost:5000/jobs/40499d80-424b-11f1-afd9-398ecf7e3873](view-source:http://localhost:5000/jobs/40499d80-424b-11f1-afd9-398ecf7e3873)">40499d80-424b-11f1-afd9-398ecf7e3873</a></td>
                <td class="small"><a href="[http://localhost:5000/processes/hello-world](view-source:http://localhost:5000/processes/hello-world)">hello-world</a></td>
                <td><abbr title="2026-04-27T15:10:39.374996Z">2026-04-27T15:10:39.374996Z</abbr></td>
                <td>
                  
                    0:00:01.847870
                  
                </td>
                <td>
                  <progress class="inline" value="1000" max="1000"></progress>
                </td>
                <td>
                  <mark class="successful">successful</mark>
                </td>
                <td>
                  Job complete
                </td>
              </tr>

and requesting the JSON format I get:

    "jobs":[
        {
            "type":"process",
            "processID":"hello-world",
            "jobID":"40499d80-424b-11f1-afd9-398ecf7e3873",
            "status":"successful",
            "message":"Job complete",
            "progress":100,
            "parameters":null,
            "created":"2026-04-27T15:10:39.374978Z",
            "started":"2026-04-27T15:10:39.374996Z",
            "finished":"2026-04-27T15:10:41.222866Z",
            "updated":"2026-04-27T15:10:41.222925Z",
            "links":[
                {
                    "href":"http://localhost:5000/jobs/40499d80-424b-11f1-afd9-398ecf7e3873/results",
                    "rel":"http://www.opengis.net/def/rel/ogc/1.0/results",
                    "type":"application/json",
                    "title":"Results of job None as application/json"
                }
            ]
        }
    ],

The only difference I can see is the timezone, the successful test having UTC, the failed test having timezone +02:00
"created":"2026-04-27T12:17:46.736341+02:00",
"created":"2026-04-27T15:10:39.374978Z",
However I think both should be accepted.

Finally I then also changed the definition of dates in the PostgreSql DB, to be without timestamp,
consequently the dates in JSON format looks like
"created":"2026-04-27T12:17:46.736341",
but the HTML (default) format is still missing Start and Duration

Expected behavior
The fields Start and Duration to display also when using PostgresqlManager.

Environment

  • OS: Ubuntu
  • Python version: 3.12.12
  • pygeoapi version: last master

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions