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
2 changes: 1 addition & 1 deletion server/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def setup_periodic_tasks(sender, **kwargs):
name="remove old project backups",
)
sender.add_periodic_task(
crontab(hour="*/12"),
crontab(hour="*/12", minute=0),
save_statistics,
name="Save usage statistics to database",
)
Expand Down
2 changes: 1 addition & 1 deletion server/mergin/stats/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class MerginStatistics(db.Model):

id = db.Column(db.Integer, primary_key=True, autoincrement=True)
created_at = db.Column(
db.DateTime, index=True, nullable=False, server_default="now()"
db.DateTime, index=True, nullable=False, default=datetime.utcnow
)
# data with statistics
data = db.Column(JSONB, nullable=False)
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ def upgrade():
op.create_table(
"mergin_statistics",
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
sa.Column("created_at", sa.DateTime(), server_default="now()", nullable=False),
sa.Column(
"created_at", sa.DateTime(), server_default=sa.text("now()"), nullable=False
),
sa.Column("data", postgresql.JSONB(astext_type=sa.Text()), nullable=False),
sa.PrimaryKeyConstraint("id", name=op.f("pk_mergin_statistics")),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial
<app-container>
<div class="grid" v-if="usage">
<usage-card class="col-12 sm:col-6 lg:col-3">
<template #heading>Editors</template>
<template #heading>Contributors</template>
<div
class="w-full"
:style="{
Expand Down
Loading