#2190 Hitcounter for AWS S3 access logs, pt.4
Merged 3 months ago by msuchy. Opened 3 months ago by frostyx.
copr/ frostyx/copr hitcounter-pt4  into  main

@@ -194,7 +194,7 @@ 

          "from_backend",

      )

      if not dry_run:

-         SafeRequest(auth=opts.frontend_auth).post(url, result)

+         SafeRequest(auth=opts.frontend_auth, log=log).post(url, result)

  

  

  def get_arg_parser():

@@ -0,0 +1,21 @@ 

+ """

+ Adjust CounterStat.name length

+ 

+ Revision ID: 50e68db97d0a

+ Revises: 5ecebe072cb7

+ Create Date: 2022-05-03 17:20:31.789922

+ """

+ 

+ import sqlalchemy as sa

+ from alembic import op

+ 

+ 

+ revision = '50e68db97d0a'

+ down_revision = '5ecebe072cb7'

+ 

+ 

+ def upgrade():

+     op.alter_column("counter_stat", "name", type_=sa.Text)

+ 

+ def downgrade():

+     op.alter_column("counter_stat", "name", type_=sa.String(127))

@@ -2156,7 +2156,7 @@ 

      Generic store for simple statistics.

      """

  

-     name = db.Column(db.String(127), primary_key=True)

+     name = db.Column(db.Text, primary_key=True)

      counter_type = db.Column(db.String(30))

  

      counter = db.Column(db.Integer, default=0, server_default="0")

  • Adjusting counter_stat.name length because some owner/project/chroot combinations are longer
  • Passing log object to SafeRequest so it doesn't traceback when there is some failure to be logged.

Build succeeded.

Pull-Request has been merged by msuchy

3 months ago