So is the migration thing still happening?


  • Considered Harmful

    SQL Server lets you write functions (including but not limited to aggregates) with any CLR language. I've written, for example, some functions in C# that call out to the .NET crypto APIs.

    Possibly this information will be useful in your quest?



  • It was only that one tag that had a control character in it, and only that one post that had a double quote with a combining character on it, and only that one user whose name started with @ and only that one database scripting language that doesn't natively support CONCAT as an aggregate function.



  • @dkf said:

    No, but I would normally expect such nonsense to be reserved for threads about HTML parsing with regular expressions…

    To be fair, rabbit is a character that is actually defined in the INTERCAL spec.


    Filed under: the INTERCAL spec has more correct implementations than the Markdown one


  • Considered Harmful

    @ben_lubar said:

    that one database scripting language that doesn't natively support CONCAT as an aggregate function.

    So write one. shrug



  • @error said:

    So write one. shrug

    It wouldn't be native then, would it?


  • Considered Harmful

    @ben_lubar said:

    It wouldn't be native then, would it?

    Nope, but I don't see why that matters. You've spent more time complaining about it than it would have taken to make it.




  • Considered Harmful

    Needs more XML.


    Filed under: Or violence.



  • Maybe both.


  • Considered Harmful

    @ben_lubar said:

    Maybe both.

    I didn't say xor violence.



  • Sure you did. You just had a bunch of other letters between the x and the or.


  • Considered Harmful

    @ben_lubar said:

    ...error ... is ... a ... Wizard...

    Well, I don't like to brag...



  • @ben_lubar said:

    if you had over 9000 topics unread in CS, you'll have over 9000 times the average number of posts per topic unread posts in Discourse

    Since I didn't have an account in CS, I guess all topics technically are unread for me (in reallity they aren't, since I've been lurking and read quite a lot of it). I hope you will make all imported posts marked as read for users not having an account on CS, or else me and the rest of us Discourse but not CS users will have a lot of clicking and scrolling to do to get reasonable "new" and "unread" counters here...



  • You may already have answered this, but how will you import posts made by users that don't have an account here?



  • Or maybe it dosesn't matter. I just realized I got 101 "new" and 75 "unread" at the moment. I won't have time to read everything, so the values will increase with time anyway. I also forgot that the way the "new" counter works is configurable.

    So if I or someone else thinks the "new" count is too high after import maybe we shall just change our setting from "You haven't viewed them yet" to something else.


  • Banned

    @YouCanCallMeAl said:

    Or maybe it dosesn't matter. I just realized I got 101 "new" and 75 "unread" at the moment. I won't have time to read everything, so the values will increase with time anyway. I also forgot that the way the "new" counter works is configurable.

    FYI, if you scroll to the bottom you can "dismiss unread" / "dismiss new"



  • @sam said:

    scroll to the bottom

    This should not be a thing if you are truly devoted to infiniscroll technology. Really, every page should just loop back to the beginning if you run out of content.



  • Cool. But the more posts there are in the list, the harder it will be to scroll to the end. End doesn't seem to work on those screens.


  • Banned

    Tricky, getting END to work there is very very tricky. Way simpler just to add a dismiss button at the top if pushed (perhaps if you have more than 100 items) you get a dismiss at the top as well or something



  • Maybe put the button on top instead. It isn't very discoverable down there below hundreds of lines



  • You should probably duplicate those at the top, by the filters.

    EDIT: Ninja'd

    EDIT: Twice


  • Banned

    Yeah if you have more than N, duplicate on top.


  • Discourse touched me in a no-no place

    Why not always at the top and bottom, rather than a different behaviour depending on the amount of posts?
    It makes the workflow with an application much easier if objects are always in the same place and that way I could say, go through the list and read any of interest before hitting Dismiss - or I could just not bother and hit Dismiss at the top without loading the rest if I feel so inclined.



  • @Keith said:

    You may already have answered this, but how will you import posts made by users that don't have an account here?

    Were any of the forum posts actually made by anonymous users? Or was that just the comments? I'm open to suggestions.


  • BINNED

    If only there was a place we could put it... somewhere always visible, but not in the way unless you really want it...

    Nope, nothing comes to mind.


  • Discourse touched me in a no-no place

    I forget that even exists - yeah, that'd work.



  •     Error creating post 25783. Skipping.
    undefined method `scan' for nil:NilClass
            1 / 263866 (  0.0%)    Error creating post 25784. Skipping.
    undefined method `scan' for nil:NilClass
            2 / 263866 (  0.0%)    Error creating post 25786. Skipping.
    undefined method `scan' for nil:NilClass
            3 / 263866 (  0.0%)    Error creating post 25789. Skipping.
    undefined method `scan' for nil:NilClass
            4 / 263866 (  0.0%)    communityserver.rb:82:in `block (2 levels) in execute': undefined method `id' for nil:NilClass (NoMethodError)
            from /var/www/discourse/script/import_scripts/base.rb:218:in `block in create_posts'
            from /usr/local/lib/ruby/2.0.0/csv.rb:1716:in `each'
            from /var/www/discourse/script/import_scripts/base.rb:217:in `create_posts'
            from communityserver.rb:73:in `block in execute'
            from /usr/local/lib/ruby/2.0.0/csv.rb:1266:in `open'
            from communityserver.rb:72:in `execute'
            from /var/www/discourse/script/import_scripts/base.rb:43:in `perform'
            from communityserver.rb:111:in `<main>'
    


  • @ben_lubar said:

    Were any of the forum posts actually made by anonymous users? Or was that just the comments? I'm open to suggestions.

    I mean posted by people that were registered on CS, but aren't on Discourse.



  • What did you think the user import was for?



  • Not every user was imported.



  • There were four that failed, but none of them made any posts, and I'm pretty sure three of them came with community server.



  • Sorry I meant originally imported which is probably where the concern is coming from.



  • Yup. I understand now.



  • Sorry about the text quality, I'm doing this over remote desktop.


  • Considered Harmful

    @ben_lubar said:

    Sorry about the text quality, I'm doing this over remote desktop.

    Wait, a cropped image? Who are you and what have you done with Ben L.?



  • 387 / 263866 ( 0.1%) Error creating post 27626. Skipping.
    Couldn't find User without an ID
    1787 / 263866 ( 0.7%) Error creating post 33108. Skipping.
    Couldn't find User without an ID
    1788 / 263866 ( 0.7%) Error creating post 33111. Skipping.
    Couldn't find User without an ID
    1791 / 263866 ( 0.7%) Error creating post 33112. Skipping.
    Couldn't find User without an ID
    1792 / 263866 ( 0.7%) Error creating post 33113. Skipping.
    Couldn't find User without an ID
    1793 / 263866 ( 0.7%) Error creating post 33115. Skipping.
    Couldn't find User without an ID
    1817 / 263866 ( 0.7%) Error creating post 33140. Skipping.
    Couldn't find User without an ID
    1818 / 263866 ( 0.7%) Error creating post 33141. Skipping.
    Couldn't find User without an ID
    1824 / 263866 ( 0.7%) Error creating post 33147. Skipping.
    Couldn't find User without an ID
    1826 / 263866 ( 0.7%) Error creating post 33149. Skipping.
    Couldn't find User without an ID
    1827 / 263866 ( 0.7%) Error creating post 33150. Skipping.
    Couldn't find User without an ID
    1830 / 263866 ( 0.7%) Error creating post 33153. Skipping.
    Couldn't find User without an ID
    1832 / 263866 ( 0.7%) Error creating post 33156. Skipping.
    Couldn't find User without an ID
    1833 / 263866 ( 0.7%) Error creating post 33157. Skipping.
    Couldn't find User without an ID
    1834 / 263866 ( 0.7%) Error creating post 33158. Skipping.
    Couldn't find User without an ID
    1845 / 263866 ( 0.7%) Error creating post 33175. Skipping.
    Couldn't find User without an ID
    1849 / 263866 ( 0.7%) Error creating post 33184. Skipping.
    Couldn't find User without an ID
    2168 / 263866 ( 0.8%)


  • Discourse touched me in a no-no place

    You could just assign those to @PaulaBean



  • 9060 / 263866 ( 3.4%) InvalidAccess creating post 73035. Topic is closed? can_create? failed
    9065 / 263866 ( 3.4%) InvalidAccess creating post 73044. Topic is closed? can_create? failed


  • Banned

    I don't know, I kind of feel that it just adds noise to the page and is a bit pointless to show if you have less than say 10 items.

    cc @codinghorror





  • 25466 / 263866 ( 9.7%) Error creating post 114176. Skipping.
    PG::Error: ERROR: duplicate key value violates unique constraint "cat_featured_threads"
    DETAIL: Key (category_id, topic_id)=(13, 2857) already exists.
    : INSERT INTO "category_featured_topics" ("category_id", "created_at", "rank", "topic_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"


  • Considered Harmful

    NICE CAPS


    Filed under: WTF? Why can't I post this?



  • @PaulaBean is murdering my computer:

    @sam is there a way to tell sidekiq to not process things for a while? One thread killing my disk is a lot better than six.


    Filed under: Ben L.-style screenshot


  • Banned

    You can stop sidekiq and/or restart it with a single thread. (bundle exec sidekiq --help)



  • @sam I stopped sidekiq using sidekiqctl, but it seems something started it back up after a few minutes. It also seems that a lot of the jobs are email-related. That's probably not good for a forum import.

    Also, these errors look troubling:

        25466 / 263866 (  9.7%)    Error creating post 114176. Skipping.
    PG::Error: ERROR:  duplicate key value violates unique constraint "cat_featured_threads"
    DETAIL:  Key (category_id, topic_id)=(13, 2857) already exists.
    : INSERT INTO "category_featured_topics" ("category_id", "created_at", "rank", "topic_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"
        33791 / 263866 ( 12.8%)    Error creating post 122545. Skipping.
    PG::Error: ERROR:  duplicate key value violates unique constraint "cat_featured_threads"
    DETAIL:  Key (category_id, topic_id)=(10, 3457) already exists.
    : INSERT INTO "category_featured_topics" ("category_id", "created_at", "rank", "topic_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"
        33800 / 263866 ( 12.8%)    Error creating post 122554. Skipping.
    Script Timed Out
        33921 / 263866 ( 12.9%)    Error creating post 122678. Skipping.
    Script Timed Out
        34131 / 263866 ( 12.9%)    Error creating post 122890. Skipping.
    Script Timed Out
        34153 / 263866 ( 12.9%)    Error creating post 122912. Skipping.
    Script Timed Out

  • Banned

    Are you running this in a docker container?

    If so you need to do a couple of things

    sv stop sidekiq
    

    If running an old config.

    If running a new config make sure UNICORN_SIDEKIQS is set to 0 and rebuild container.

    There is also a way to pause sidekiq that the import/export code uses, you can probably just use that with rails c



  • Before I rebuild this docker instance, is there an easy way to put mailcatcher in it? I'd rather not have all the sidekiq tasks for email repeated a bunch of times with a fake SMTP server.


  • Banned

    just add:

    gem install mailcatcher
    

    In the same section as you add the docker manager stuff

    Then add an executable file into /etc/runit/1.d to execute mailcatcher on startup.



  • /pups/lib/pups/exec_command.rb:85:in spawn': cd /var/www/discourse && gem install mailcatcher failed with return #<Process::Status: pid 268 exit 1> (RuntimeError) from /pups/lib/pups/exec_command.rb:55:in block in run'
    from /pups/lib/pups/exec_command.rb:53:in each' from /pups/lib/pups/exec_command.rb:53:in run'
    from /pups/lib/pups/command.rb:6:in run' from /pups/lib/pups/config.rb:85:in block (2 levels) in run_commands'
    from /pups/lib/pups/config.rb:76:in each' from /pups/lib/pups/config.rb:76:in block in run_commands'
    from /pups/lib/pups/config.rb:75:in each' from /pups/lib/pups/config.rb:75:in run_commands'
    from /pups/lib/pups/config.rb:71:in run' from /pups/lib/pups/cli.rb:31:in run'
    from /pups/bin/pups:8:in `<main>'
    7c11aba06ccdefe93b0c401b82ca3ee5aad6f91f81eaa64eae79e8609338d98b
    FAILED TO BOOTSTRAP

    Here's my hooks section:

    hooks:
      after_code:
        - exec:
            cd: $home/plugins
            cmd:
              - mkdir -p plugins
              - git clone https://github.com/discourse/docker_manager.git
    
        - exec:
            cd: $home
            cmd:
              - apt-get -y install libsqlite3-dev
              - gem install mailcatcher
    
        - file:
           path: /etc/service/mailcatcher/run
           chmod: "+x"
           contents: |
              #!/bin/sh
              exec 2>&1
              exec mailcatcher -f --ip 0.0.0.0
    

  • Banned

    There, I fixed it for you :)


Log in to reply